Handle child_setup being NULL. (#445691, Christopher Taylor)
authorMatthias Clasen <mclasen@redhat.com>
Mon, 11 Jun 2007 00:18:51 +0000 (00:18 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 11 Jun 2007 00:18:51 +0000 (00:18 +0000)
2007-06-10  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkspawn-x11.c (set_environment): Handle child_setup
        being NULL.  (#445691, Christopher Taylor)

svn path=/trunk/; revision=18097

ChangeLog
gdk/x11/gdkspawn-x11.c

index bf2287fe0814ab8ae81dd4885ddb7e4257ec3067..b46f3607f06c8a8390941a8383e241d0927fefdf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-10  Matthias Clasen  <mclasen@redhat.com>
+
+       * gdk/x11/gdkspawn-x11.c (set_environment): Handle child_setup
+       being NULL.  (#445691, Christopher Taylor)
+
 2007-06-10  Emmanuele Bassi  <ebassi@gnome.org>
 
        * gtk/gtksearchenginesimple.c: Unconditionally define _GNU_SOURCE
index 028351e366288d35359791f66710de8dfe6c4922..ca40b285f8fdbbd96514b20e220c145c75bd5fa7 100644 (file)
@@ -37,8 +37,8 @@ typedef struct {
 
 /*
  * Set the DISPLAY variable, and then call the user-specified child setup
- * function.  This is required so that applications can use gdk_spawn_* and call
- * putenv() in their child_setup functions.
+ * function.  This is required so that applications can use gdk_spawn_* and 
+ * call putenv() in their child_setup functions.
  */
 static void
 set_environment (gpointer user_data)
@@ -47,7 +47,8 @@ set_environment (gpointer user_data)
   
   g_setenv ("DISPLAY", setup->display, TRUE);
   
-  setup->child_setup (setup->user_data);
+  if (setup->child_setup)
+    setup->child_setup (setup->user_data);
 }
 
 /**